package cn.gp.chatclient.model;

import lombok.Data;

import java.util.Date;


/**
 * @ClassName FriendRequestVo
 * @Description TODO
 * @Author He Guoping
 * @Date 2025/6/17 9:43
 * @Version JDK17
 */
@Data
public class FriendRequestVo {
    private Long id;
    private Long requesterId;
    private Long receiverId;
    private String requestMessage;
    private Integer status; // 0-待处理 1-已接受 2-已拒绝
    private Date createTime;

    // 请求者信息
    private String requesterUsername;
    private String requesterNickname;
    private String requesterAvatar;
    private Integer requesterStatus;

    // 用于前端显示的请求者信息对象
    private UserVo requesterInfo;

    public void setRequesterInfo(UserVo info) {
        this.requesterInfo = info;
        if (info != null) {
            this.requesterUsername = info.getUsername();
            this.requesterNickname = info.getNickname();
            this.requesterAvatar = info.getAvatar();
            this.requesterStatus = info.getStatus();
        }
    }
}
